﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Tasks
{
    static class TaskFactory
    {
        internal readonly static Dictionary<TaskStatus, string> StatusDescription;
        internal readonly static Dictionary<DurationUnit, string> DurationUnitDescription;
        internal readonly static Dictionary<ScheduleType, string> ScheduleTypeDescription;
        static TaskFactory()
        {
            StatusDescription = new Dictionary<TaskStatus, string>();
            StatusDescription.Add(TaskStatus.InProgress, "任务处理中");
            StatusDescription.Add(TaskStatus.Stopped, "任务已停止");
            StatusDescription.Add(TaskStatus.Started, "任务已启动");
            StatusDescription.Add(TaskStatus.WaitingForProcess, "任务等待执行");
            StatusDescription.Add(TaskStatus.WaitingForNext, "任务等待下次执行");
            StatusDescription.Add(TaskStatus.WaitingForStop, "任务正在停止");

            DurationUnitDescription = new Dictionary<DurationUnit, string>();
            DurationUnitDescription.Add(DurationUnit.Second, "秒");
            DurationUnitDescription.Add(DurationUnit.Minute, "分钟");
            DurationUnitDescription.Add(DurationUnit.Hour, "小时");
            DurationUnitDescription.Add(DurationUnit.Day, "天");
            DurationUnitDescription.Add(DurationUnit.Month, "月");

            ScheduleTypeDescription = new Dictionary<ScheduleType, string>();
            ScheduleTypeDescription.Add(ScheduleType.Iteration, "重复任务");
            ScheduleTypeDescription.Add(ScheduleType.Once, "一次性任务");
        }
    }
}
